/**
    Die Ewigen Extension
    Copyright (C) 2011 DonKrieg @ sonkyu@googlemail.com

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>.
*/

var ewigenContextMenuLinks      = chrome.contextMenus.create({title: "Links",           parentId: ewigenContextMenu,        contexts: ["selection", "page"]});
var ewigenContextMenuLinksEFTA  = chrome.contextMenus.create({title: "Efta-Karten",     parentId: ewigenContextMenuLinks,   contexts: ["selection", "page"]});

chrome.contextMenus.create({title: "HoP-Karte",     parentId: ewigenContextMenuLinksEFTA, contexts: ["selection", "page"], onclick: showEftaMap1});
chrome.contextMenus.create({title: "Kaldera-Karte", parentId: ewigenContextMenuLinksEFTA, contexts: ["selection", "page"], onclick: showEftaMap2});

function showEftaMap1(info, tab) {
    chrome.tabs.create({"url":"http://hop.nierlein.de/efta2.php",   selected: true});
}

function showEftaMap2(info, tab) {
    chrome.tabs.create({"url":"http://ennok.en.ohost.de/efta/",     selected: true});
}